<script type="text/javascript" src="./Public/Home/js/jquery-1.8.2.min.js"></script>
<!--<script type="text/javascript" src="./Public/Home/js/jquery.1.7.2-min.js"></script>-->
<script type="text/javascript" src="./Public/Home/js/js.js"></script>

</head>
<body>
	
	<?php 
		//获得顶级分类,导航条
		$cateModel =  new \Common\Model\Admincate;
		$topCate = $cateModel->where("pid=0")->get();
	?>
<!-- 顶部开始 -->
<div id="top">
   <div class="topall">
       <a class="topallleft1" href="<?php echo U('Index/index')?>">商城首页</a>
       <a class="topallleft2" href="">玩货</a>
       <?php if(empty($_SESSION['username'])){?>
                
       <span class='topallleft3'>
       <a href="<?php echo U('Login/index')?>" class="login">登录</a>
       <a href="<?php echo U('Reg/index')?>" class="reg">注册</a>  
       </span>
       <?php }else{?> 
       <span class='topallleft3'>
       <a href="" class="login"><?php echo $_SESSION['username']?></a>
       <a href="<?php echo U('Login/out')?>" class="reg">退出</a>  
       </span>
       
               <?php }?>
       <span class='link'>|</span>
       <span class='topallleft3'>
       <a href="<?php echo U('Orderlist/index')?>" class="reg">我的订单</a>     
       </span>
       <span class='link'>|</span>
       <span class='topallleft3'>
       <a href="" class="reg">我的卖家</a>     
       </span>
       <span class='link'>|</span>
       <span class='topallleft3'>
       <a href="" class="reg">帮助中心</a>     
       </span>
       <span class='link'>|</span>
       <span class='topallleft4'>客服电话 400-810-0580</span>
   </div>	
</div>
<!-- 顶部结束 -->
<!-- 搜索区域开始 -->
<div id="search">
   <div class="searchleft">
   	  <a href=""class="searchlogo"></a>
   <div class="searchka">
  	 <form name="" action="" target="">
  	   <div class="searchkatext">
  	     <input name="" value="" type="text">
  	   </div>
  	   <div class="searchkasubmit">
  	     <input value="搜&nbsp;&nbsp;&nbsp;索" type="submit">
  	   </div>
  	   </form>
  	   <ul class="searchgjz">
	  	   <li><a href="">GoPro</a></li>
	  	   <li><a href="">大疆</a></li>
	  	   <li><a href="">PHILIPS电动牙刷</a></li>
	  	   <li><a href="">演唱会门票</a></li>
	  	   <li><a href="">20元海淘券</a></li>
  	   </ul>
  	   <?php  $ab=Cart::getTotalNums(); ?>

   </div>
       <?php if(!isset($ab)){?>
                
     <a href="<?php echo U('Cart/index',array('cmid'=>0))?>" class="searchgwc"><i><em id='gwc' style="overflow: hidden;">0</em></i>购物车</a>
       <?php }else{?>
     <a href="<?php echo U('Cart/index',array('cmid'=>0))?>" class="searchgwc"><i><em id='gwc' style="overflow: hidden;"><?php echo $ab?></em></i>购物车</a>
       
               <?php }?>
   </div>
</div>
<!-- 搜索区域结束 -->

<!-- 导航分类开始 -->
<div id="nav">
	<div class="navall">
		<ul>
			<li><a href="index.php" <?php if('Cata'=='Index'){?>
                class="nav1"
               <?php }?> >首页</a></li>
			<?php foreach ($topCate as $v){?>
			<li><a href="<?php echo U('Cata/index',array('cid'=>$v['cid']))?>" <?php if($v['cid']==Q('get.cid',0,'intval')){?>
                class="nav1"
               <?php }?>><?php echo $v['cname']?></a></li>
			<?php }?>
		</ul>
	</div>
</div>
<!-- 导航分类结束 -->
